{extend name="public:default" /}

<!-- 搜索栏 -->
{block name="inputBtn"}
    
    <div class="layui-inline marSelect">
        <div class="layui-input-inline">
            <select name="agency_number_is_show">
                <option value="">是否显示</option>
                <option value="1">是</option>
                <option value="0">否</option>
            </select>
        </div>
    </div>
    
    <br>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>代理昵称</legend>
            <input type="text" name="agency_number_p_nickname" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>权限名称</legend>
            <input type="text" name="agency_number_rank_name" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>名称</legend>
            <input type="text" name="agency_number_nickname" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>

    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>账号</legend>
            <input type="text" name="agency_number_name" placeholder="点此输入" autocomplete="off" class="layui-input">
        </fieldset>
    </div>


    <div class="layui-inline">
        <fieldset class="label_title">
            <legend>请选择日期</legend>
            <input type="text" name="agency_number_times" placeholder="点此选择" class="layui-input" id="test-laydate-range-datetime" lay-key="1" readonly>
        </fieldset>
    </div>
    
{/block}

<!-- 头工具栏 -->
{block name="tableTopBtn"}
    <button class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del"><i class="layui-icon"></i></button>
    <button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="add"><i class="layui-icon"></i></button>
{/block}

<!-- 行工具栏 -->
{block name="tableEndBtn"}
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit"><i class="layui-icon"></i></a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon"></i></a>
{/block}


{block name="script"}
    <script>
        var editList = window.location.pathname;
        var editAdd = editList + 'Add';
        var editDel = editList + 'Del';
        var editUp  = editList + 'Up';

        views.setUrl(editAdd,editDel,editUp).cols({
            url:editList,
            page:true,

            cols : [
                {type:'checkbox' , fixed: 'left'}

                ,{field:'id',title :"ID",align:'center'}
                ,{field:'agency_number_p_id',title:"代理ID",align:'center'}
                ,{field:'agency_number_p_nickname',title:"代理昵称",align:'center'}
                ,{field:'agency_number_nickname',title:"名称",algin:'center'}
                ,{field:'agency_number_name',title:'账号',algin:'center'} 
                ,{field:'agency_number_rank_name',title:'权限名称',algin:'center'}
                ,{field:'agency_number_is_show',title:'是否显示',algin:'center'
                    ,templet:function(d)
                    {
                        return d.agency_number_is_show ? '是' : '否' ;
                    }
                }
                ,{field:'agency_number_times',title:'添加时间', align:'center', templet:function(d){ return d.agency_number_times ? layui.util.toDateString(d.agency_number_times * 1000) : '' ; }}

                ,{fixed: 'right', title:'操作', toolbar: '#test-table-toolbar-barDemo', width:150}
            ]
        }).toolbar(function(obj,data,table){
            // 头工具栏事件

        }).tool(function(obj,table){
            //监听行工具事件

        }).get();
    </script>
{/block}